package com.tjdr.his.common.result;

import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * @AUTHOR 张三
 * @DATE 2024/10/10 16:30
 * @DESCRIBER
 */
@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class HttpResp <T> implements Serializable {
    /**
     * 状态码
     */
    private ResultCode resultCode;
    /**
     * 返回结果的时间
     */
    private Date date;
    /**
     * 给前端数据
     */
    private T results;

    public  static  HttpResp createHttpRespInstance(ResultCode resultCode,Object results){
        return new HttpResp<>(resultCode,new Date(),results);

    }
}